{% extends 'base.html' %}


{% block tips %}
    <h3>添加书籍</h3>
{% endblock tips %}

{% block content %}
    <div class="col-md-offset-2 col-md-6">
        <form action="{% url 'book:book_add' %}" method="post">
            {% csrf_token %}
            {% for field in book_form %}
                {{ field.label }}
                {{ field }}
                <span class="text-danger">{{ field.errors.0 }}</span>
            {% endfor %}
            <button type="submit" class="btn btn-success pull-right">提交</button>
        </form>
    </div>
{% endblock content %}
